Maximum Product Of The Length Of Two Palindromic Subsequences - Leetcode 2002 - Python